home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Bank smakow
/
BankSmakow.air
/
BankSmakow.swf
/
scripts
/
com
/
makingwaves
/
vo
/
Recipe.as
< prev
Wrap
Text File
|
2009-12-16
|
1KB
|
53 lines
package com.makingwaves.vo
{
import com.adobe.cairngorm.vo.IValueObject;
import mx.utils.StringUtil;
public class Recipe implements IValueObject
{
public var ingredients:Array;
public var match:Number;
public var name:String;
private var _ingredientsText:String;
public var updated:Date;
public var preparation:String;
public var id:int;
public function Recipe()
{
super();
ingredients = new Array();
}
public function get isNew() : Boolean
{
if(updated != null)
{
return new Date(updated.fullYear,updated.month,updated.date + 14) > new Date();
}
return false;
}
public function get ingredientsText() : String
{
var _loc1_:String = _ingredientsText;
_loc1_ = StringUtil.trim(_loc1_);
_loc1_ = _loc1_.replace(/\n/g,"- ");
return _loc1_.replace(/^/,"- ");
}
public function set ingredientsText(param1:String) : void
{
_ingredientsText = param1;
}
}
}